<!DOCTYPE html>
<html>
<head>
    <base href="/">
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="renderer" content="webkit">
    <title>{wc:$webname}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link href="{G_TEMPLATES_CSS}/mobile/comm.css" rel="stylesheet" type="text/css"/>
    <link href="{G_TEMPLATES_CSS}/mobile/index.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="{G_TEMPLATES_CSS}/mobile/reset.css">
    <link rel="stylesheet" href="{G_TEMPLATES_CSS}/mobile/animate.css">
    <link rel="stylesheet" href="{G_TEMPLATES_CSS}/mobile/style.css">
    <link href="{G_TEMPLATES_CSS}/mobile/main.css" rel="stylesheet" type="text/css">

    <script src="{G_TEMPLATES_JS}/mobile/jquery.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/js.cookie.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/lodash.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/response.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/swiper.min.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/countdown.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/simpop.min.js"></script>
    <script src="{G_TEMPLATES_JS}/mobile/jquery.lazyload.min.js"></script>
    <script>
        var DuoBao = {};
        var __data__ = (function () {
            return JSON.parse('{}');
        })();
        var __user__ = (function () {
            return JSON.parse('{}');

        })();
        var __touchorclick__ = (function () {
            if ('ontouchend' in document)
                return 'touchend';
            else
                return 'click';
        })();
    </script>
</head>
<style>
    .img-topright {
        padding-right: 0.8rem;
        padding-top: 1rem;
        height: 3.5rem;
        width: auto;
        float: right;
    }
    #marquee_area {
        background-color: #ffffff;
        padding: 5px 0px 5px 0px;
        border-top:1px solid #DCDCDC ;
     }
    #marqueeBox {
        margin-top: 1px;
        height: 25px;
        width: 90%;
    }
    #marqueeBox span {
        font-size: 13px;
        line-height: 25px;
        color: #333333;
        white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    #marqueeBox .f12red {
        color: red;
    }
    #marqueeBox .blue {
        color: blue;
    }
    .horns {
        margin: 6px 2px 0px 5px;
        display: inline-block;
        float: left;
        line-height: 100%;
        height: 18px;
        width: 18px;
        background-image: url('/duobao/statics/templates/yungou/images/mobile/horns2.png');
        background-repeat: no-repeat;
        background-size : 90%;
    }
</style>

<body>
{wc:templates "mobile/index","header"}
<div class="container">
    <main class="db-main db-main-index">
        <style type="text/css">
            .zxjx > a:link, .zxjx > a:visited, .zxjx > a:hover, .zxjx > a:active,
            .tabs > a:link, .tabs > a:visited, .tabs > a:hover, .tabs > a:active {
                color: #323232;
            }

            .tab_selected {
                color: #ff5151;
                border-bottom: 3px solid #ff5151;
            }

            .color_blue {
                color: #2a99e0;
            }

            .btn_buy {
                font-size: 1rem;
                border-radius: 0.3rem;
                border: 1px solid #ff5151;
                color: #ff5151;
                text-align: center;
                padding: 0.5rem 0.3rem;
            }

            .item_bottom_container {
                overflow: hidden;
                padding: 0 5%;
                margin-top: 0.8rem;
                font-size: 1rem;
            }

            .jdt_container {
                float: left;
                width: 60%;
            }

            .jdt_container div {
                color: #646464;
            }

            .buy_container {
                float: left;
                width: 40%;
                text-align: center;
            }

            .tab_load_more {
                text-align: center;
                color: #868686;
                font-size: 1.2rem;
                padding: 0.8rem 0rem 0rem;
            }

        </style>
        <!-- 焦点图 -->
        <div class="swiper-container">
            <div class="swiper-wrapper">
                {wc:loop $shop_ad $ad}
                <div class="swiper-slide swiper-slide-active">
                    <a href="{wc:$ad['link']}">
                        <img alt="{wc:$ad['title']}" src="{G_UPLOAD_PATH}/{wc:$ad['img']}">
                    </a>
                </div>
                {wc:loop:end}
            </div>
            <div class="swiper-pagination swiper-pagination-clickable"><span
                    class="swiper-pagination-bullet swiper-pagination-bullet-active"></span><span
                    class="swiper-pagination-bullet"></span></div>
        </div>
        <script>
            var mySwiper = new Swiper('.swiper-container', {
                autoplay: 5000,//可选选项，自动滑动
                pagination: '.swiper-pagination',
                paginationClickable: true,
            })
        </script>
        <!-- <div class="zxjx">
           <a href="{WEB_PATH}/mobile/mobile/lottery">最新揭晓<label style="position:absolute; right:1rem; cursor:pointer">显示全部&nbsp;></label></a>
           <ul class="ul ">
             <script>
               (function(){
                 DuoBao.refresh_prize = function refresh_prize(){
                   var $el = $($(this).data('dom_id'));
                   $.get($el.attr('title'), function(data){
                       $el.html(data);
                   });
                 };

               })();
             </script>
            {wc:loop $shopqishu $k $qishu}
             {wc:php:start}
                         $qishu['q_user'] = unserialize($qishu['q_user']);
             {wc:php:end}

             <li>
               <a href="{WEB_PATH}/mobile/mobile/item/{wc:$qishu['id']}" id="r{wc:$qishu['id']}" title="{WEB_PATH}/mobile/mobile/itemajax/{wc:$qishu['id']}">
                 <div style="width:90%; margin-left:5%;">
                   <img  style="width:90%; margin-left:5%;" src="{G_UPLOAD_PATH}/{wc:$qishu['thumb']}"  class="lazy_loading_image">
                 </div>
                 <div class="txt" style="">
                   <h6>{wc:fun:_strcut($qishu['title'],20)}</h6>
                   {wc:if $qishu['q_showtime']=='N'}
                   <div class="zj"><span>中奖</span><span style="color: #5bb6ea;">{wc:fun:get_user_name($qishu['q_uid'],'username')}</span></div>
                   {wc:else}
                   <div class="zj">
                   <div style="text-align:center; padding: 0.2rem;white-space: nowrap; text-overflow: ellipsis; overflow: hidden; background-color:#ff5151; color:#fff; border-radius:1rem;">
                     <time class="countdown"
                       style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden;"
                       data-dom_id="#r{wc:$qishu['id']}"
                       data-sec="{wc:fun:ceil($qishu['q_end_time']-time())}"
                       data-text="正在揭晓..."
                       data-delay="1000"
                       data-callback="DuoBao.refresh_prize">开始倒计时</time>
                   </div>
                   </div>
                   {wc:if:end}
                 </div>
               </a>
             </li>
              {wc:loop:end}
           </ul>
         </div>-->
        <div id="marquee_area">

        </div>
        <div class="tabs-wrap" style="min-height:1000px;">
            <div class="zxjx">
                <a href="{WEB_PATH}/mobile/mobile/glist" class="tab_selected" data-order_by='level'>最新奖品<label
                        style="position:absolute; right:1rem; cursor:pointer">显示全部&nbsp;></label></a>
            </div>
            <div class="tabs-content">
                <ul class="ul">
                    {wc:loop $shoplistrenqi $renqi}
                    <li id="{wc:$renqi['id']}">
                        <a id="prize_url" href="javascript:;" class="add1" codeid="{wc:$renqi['id']}">
                            <img style="display: block;" data-original="{G_UPLOAD_PATH}/{wc:$renqi['thumb']}"
                                 id="prize_image" src="{G_UPLOAD_PATH}/{wc:$renqi['thumb']}">
                            <h6 id="prize_title">{wc:$renqi['title']}</h6>
                            <div class="item_bottom_container">
                                <div class="jdt_container">
                                    <div>进度&nbsp;<label class="color_blue" id="jd">{wc:fun:percent($renqi['canyurenshu'],$renqi['zongrenshu'])}</label>
                                    </div>
                                    <span class="jdt" style="margin-left:0rem;"><span
                                            style="width:{wc:$renqi['canyurenshu']/$renqi['zongrenshu']*100}%;"></span></span>
                                </div>
                                <div class="buy_container">
                                    <div class="btn_buy">立即夺宝</div>
                                </div>
                            </div>
                        </a>
                    </li>
                    {wc:loop:end}
                </ul>
                <script type="text/javascript">
                    //打开页面加载数据
                    window.onload = function () {
                        //购物车数量
                        $.getJSON('{WEB_PATH}/mobile/ajax/cartnum', function (data) {
                            if (data.num) {
                                $("#btnCart").append('<em>' + data.num + '</em>');
                            }
                        });
                    }
                    //添加到购物车
                    $(document).on("click", '.add1', function () {
                        var codeid = $(this).attr('codeid');
                        window.location.href = "{WEB_PATH}/mobile/mobile/item/" + codeid;
                    });
                </script>
            </div>
        </div>
    </main>
    <script src="{G_TEMPLATES_JS}/mobile/main.js"></script>
</div>
{wc:php:start}
$f_home = '';
$f_whole = '';
$f_jiexiao = '';
$f_car = '';
$f_personal = '';

if( ROUTE_C == 'home' || ROUTE_C == 'user' ){
$f_personal = 'cur';
}else if( ROUTE_C == 'mobile' && ROUTE_A == 'init'){
$f_home = 'cur';
}else if( ROUTE_C == 'mobile' && ROUTE_A == 'glist'){
$f_whole = 'cur';
}else if( ROUTE_C == 'mobile' && ROUTE_A == 'lottery'){
$f_jiexiao = 'cur';
}else if( ROUTE_C == 'shaidan'){
$f_car = 'cur';
}
{wc:php:end}
<p>
    <br/>
</p>
<p>
    <br/>
</p>
<p>
    <br/>
</p>
<style>
    .footerdi .f_home i.cur {
        background-position: 0 0 !important;
    }

    .footerdi .f_whole i.cur {
        background-position: 0 -52px !important;
    }

    .footerdi .f_jiexiao i.cur {
        background-position: 0 -226px !important;
    }

    .footerdi .f_car i.cur {
        background-position: 0 -102px !important;
    }

    .footerdi .f_personal i.cur {
        background-position: 0 -150px !important;
    }
</style>
<div class="footerdi" style="bottom: 0px;">
    <ul>
        <li class="f_home">
            <a title="首页" href="{WEB_PATH}/mobile/mobile/"><i class="{wc:$f_home}">&nbsp;</i>首页</a>
        </li>
        <li class="f_whole">
            <a title="全部奖品" href="{WEB_PATH}/mobile/mobile/glist"><i class="{wc:$f_whole}">&nbsp;</i>全部奖品</a>
        </li>
        <li class="f_jiexiao">
            <a title="最新揭晓" href="{WEB_PATH}/mobile/mobile/lottery"><i class="{wc:$f_jiexiao}">&nbsp;</i>最新揭晓</a>
        </li>
        <li class="f_car">
            <a title="首页" href="{WEB_PATH}/mobile/shaidan"><i class="{wc:$f_car}">&nbsp;</i>晒单</a>
        </li>
        <li class="f_personal">
            <a title="首页" href="{WEB_PATH}/mobile/home"><i class="{wc:$f_personal}">&nbsp;</i>个人中心</a>
        <li>
    </ul>
</div>
</body>
</html>
<style>
    #pageDialogBG {
        -webkit-border-radius: 5px;
        width: 255px;
        height: 45px;
        color: #fff;
        font-size: 16px;
        text-align: center;
        line-height: 45px;
    }
</style>
<div id="pageDialogBG" class="pageDialogBG">
    <div class="Prompt"></div>
</div>
<style>
    .contact-public {
        position: fixed;
        right: 0px;
        width: 30px;
        padding: 0;
        line-height: 15px;
        border-radius: 5px;
        background: rgba(255, 222, 173, 1);
        bottom: 70px;
        text-align: center;
        color: #fff;
        z-index: 2;
    }

    .contact-public li {
        display: block;
        border-bottom: 1px solid #7D7D7D;
        text-align: center;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -o-box-sizing: border-box;
        box-sizing: border-box;
    }

    .contact-public li:last-child {
        border-bottom: 0;
        border-top: 1px solid #242424;
    }

    .contact-public a {
        display: block;
        color: #FD94FC;
        font-size: 16px;
        text-align: center;
        padding: 6px;
    }

    .contact-public .icon-tel {
        display: block;
        margin: 0px auto 0 auto;
        width: 25px;
        height: 20px;
        background: url("http://wfx.91dcw.com/weixin/images/distribution2.png") -200px -820px;
        background-size: 300px 1000px;
    }
    #cnzz_stat_icon_1260582628 {
        display: none;
    }
</style>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1260582628'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1260582628%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
<!--<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <ul style="display:none;" class="contact-public">
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={wc:fun:_cfg("qq")}&site=qq&menu=yes">联<br>系<br>客<br>服</a>
     </ul>-->
 <!--<script>
   wx.config({
         debug: false,
         appId: "{wc:php:start} echo $wechat['appid'];{wc:php:end}",
         timestamp: {wc:php:start} echo $signPackage["timestamp"];{wc:php:end},
         nonceStr: '{wc:php:start} echo $signPackage["nonceStr"];{wc:php:end}',
         signature: '{wc:php:start} echo $signPackage["signature"];{wc:php:end}',
        jsApiList: ["checkJsApi", "onMenuShareAppMessage", "onMenuShareTimeline", "onMenuShareWeibo", "onMenuShareQQ"]
   });

   var shareTitle = [
       '现金红包在这，快点来摇！',
       '红包福利！抱抱堂摇摇乐',
       '现金红包，拿走不谢！',
       '抱抱堂爆米花新玩法，到店摇一摇，现金红包抢不停',
       '一大波红包正在靠近，快来试试手气',
       '天呐，居然有这么多现金红包'
   ];

   wx.ready(function () {
     var n = $("#hidLineLink").val();
     wx.onMenuShareTimeline({
         title: "抱抱堂-摇摇乐", // 分享标题
         link: n, // 分享链接
         imgUrl: "{G_TEMPLATES_STYLE}/images/mobile/iphone6.jpg", // 分享图标
         success: function () {
            alert('已分享');
         },
         cancel: function () {
             alert('已取消');
         }
     });
     wx.onMenuShareAppMessage({
         title: "抱抱堂-摇摇乐", // 分享标题
         desc: shareTitle[Math.floor(Math.random()*100 % shareTitle.length)], // 分享描述
         link: n, // 分享链接
         imgUrl: "{G_TEMPLATES_STYLE}/images/mobile/iphone6.jpg", // 分享图标
         type: '', // 分享类型,music、video或link，不填默认为link
         dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
          success: function () {
            alert('已分享');
         },
         cancel: function () {
             alert('已取消');
         }
     });
 });
 </script>-->
<script>
    var marqueeContent = [];   //滚动新闻
    {wc:loop $shoplist $i $shop}
        marqueeContent.push("<span>恭喜{wc:$shop['q_user']}获得</span><span href=# target=_blank class='f12red'> {wc:$shop['title']}<br></span>");
    {wc:loop:end}
    var marqueeInterval = new Array();  //定义一些常用而且要经常用到的变量
    var marqueeId=0;
    var marqueeDelay=3000;
    var marqueeHeight=25;
    //接下来的是定义一些要使用到的函数
    function initMarquee() {
        var str=marqueeContent[0];
        $('#marquee_area').html('<span class="horns"></span><div id=marqueeBox style="overflow:hidden;height:'+marqueeHeight+'px" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)">'+str+'</div>');
        marqueeId++;
        marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
    }
    function startMarquee() {
        var str=marqueeContent[marqueeId];
        marqueeId++;
        if(marqueeId>=marqueeContent.length) marqueeId=0;
        if(marqueeBox.childNodes.length==1) {
            var nextLine=document.createElement('DIV');
            nextLine.innerHTML=str;
            marqueeBox.appendChild(nextLine);
        }
        else {
            marqueeBox.childNodes[0].innerHTML=str;
            marqueeBox.appendChild(marqueeBox.childNodes[0]);
            marqueeBox.scrollTop=0;
        }
        clearInterval(marqueeInterval[1]);
        marqueeInterval[1]=setInterval("scrollMarquee()",24);
    }
    function scrollMarquee() {
        marqueeBox.scrollTop++;
        if(marqueeBox.scrollTop%marqueeHeight==(marqueeHeight-1)){
            clearInterval(marqueeInterval[1]);
        }
    }
    initMarquee();
</script>
